<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
	<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript">
    	function on_dept2_selected(node){
    	  $('#newdeptno').text(node.id);
    	}
    	$(document).ready(function(){    		
     		$('#selectdept').click(function (){
     	  		$('#sel_dept_win').window('open');
    		});
     		$('#save').click(function (){
              post_request('moveWorker.action',{
              	identifyno:$('#identifyno').text(), 
              	newDeptNo:$('#newdeptno').text()},
                  function (data){
                    $.messager.alert('员工调动', data.result.message, 'info');
                    
                    if (data.result.code=='0'){
                      var $tbl = $('#worker_table');
                      var row = $tbl.datagrid('getSelected');
                      var index = $tbl.datagrid('getRowIndex',row);
                      $tbl.datagrid('deleteRow', index);
                      
                      $('#move_worker_detail_panel').window('close');
                    }
                  });
    		});
			
     		$('#cancel').click(function (){
     			$('#move_worker_detail_panel').window('close');
    		});
            $('#move_worker_detail_panel').window();
    	});
    </script>
	</head>
	<body>
	<s:include value="../selectdept.jsp"></s:include>
    <div id="move_worker_detail_panel" collapsible="false" fit="false" modal="true"
    	title="员工调动" resizable="false" collapsible="false" minimizable="false" 
    	maximizable="false" closable="true" closed="true" icon="icon-save"
    	class="jquery_window">
    	<s:form id="move_worker_form" action="moveWorker" cssStyle="margin:20px,50px">
    		<table>
    			<tr height="28px">
    				<td><s:label value="身份证号："></s:label></td>
    				<td><s:label id="identifyno" cssClass="text_field_css"
    					cssStyle="width:150px;height:18px"></s:label></td>
    			</tr>
    			<tr height="28px">
    				<td><s:label value="姓名："></s:label></td>
    				<td><s:label id="name" cssClass="text_field_css" 
    					cssStyle="width:150px;height:18px"></s:label></td>
    			</tr>
    			<tr height="28px">
    				<td><s:label value="调出机构："></s:label></td>
    				<td><s:label id="deptno" cssClass="text_field_css" 
    					cssStyle="width:150px;height:18px"></s:label></td>
    			</tr>
    			
    			<tr height="28px">
    				<td><s:label value="调入机构：" for="newdeptno"></s:label></td>
    				<td><s:label id="newdeptno"  cssStyle="width:150px;height:18px" 
    					cssClass="text_field_css"></s:label><label style="width:4px"></label>
    					<button id="selectdept" class="buttons_css" 
    						style="width:80px"><label style="70px" 
    						class="infoclass">选择机构</label></button></td>
    			</tr>
    			
    			<tr height="35px">
    				<td colspan="2" align="center">
            			<button id="save" class="buttons_css" style="width:70px">
            				<label style="70px" class="save_css">保存</label></button>
            			<label style="width:20px"></label>
            			<button id="cancel" class="buttons_css" style="width:70px">
            				<label style="70px" class="cancel_css">返回</label></button>
    				</td>
    			</tr>
    		</table>
    	</s:form>
    </div>
    </body>
</html>